<template>
<div>
  <h1>评论</h1>
  <p><textarea v-model="from.content"></textarea></p>
  <button @click="add">提交</button>
</div>
</template>

<script>
export default {
  name: "user_talk",
  data(){
    return{
      from:{shop:this.$route.query.id,user:localStorage.getItem('userid')}
    }
  },
  methods:{
    add(){
      this.$axios.post('users/content/',this.from)
      .then(res=>{
        if(res.data.code==200){
            this.$router.push('/user')
        }
      })
    }
  }

}
</script>

<style scoped>

</style>
